package com.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dao.DynamicDao;
import com.entity.Dynamic;

/**
 * @description:
 * @author:wsc
 * @date:2020年3月9日 下午4:05:47
 */
@Service
@Transactional
public class DynamicServiceImpl {
	@Resource
	public DynamicDao dynamicDao;
	
	public void addDynamic(Dynamic dynamic){
		this.dynamicDao.addDynamic(dynamic);
	}
	public void deleteDynamic(Dynamic dynamic){
		this.dynamicDao.deleteDynamic(dynamic);
	}
	public List<Dynamic> queryDyamicAscByUid(int uid){
		List<Dynamic> dynamic= this.dynamicDao.queryDynamicAscByUid(uid);
		return dynamic;
	}
	public void updateDynamic(Dynamic dynamic){
		this.dynamicDao.updateDynamic(dynamic);
	}
	public List<Dynamic> queryDynamicList(){
		return this.dynamicDao.queryDynamicList();
	}
	public List<Dynamic> queryDynamicDescByPage(int pageNum, int pageSize){
		List<Dynamic> dynamic=this.dynamicDao.queryDynamicDescByPage(pageNum, pageSize);
		return dynamic;
		
	}
	public List<Dynamic> queryDynamicPageDescByUid(int uid,int pageNum,int pageSize){
		List<Dynamic> dynamic=this.dynamicDao.queryDynamicPageDescByUid(uid, pageNum, pageSize);
		return dynamic;
	}
	public List<Dynamic> queryDynamicPageAscByUid(int uid,int pageNum,int pageSize){
		List<Dynamic> dynamic=this.dynamicDao.queryDynamicPageAscByUid(uid, pageNum, pageSize);
		return dynamic;
	}

}
